import React from "react";
import KnowledgeGraph from "@/components/KnowledgeGraph";

const data = {
  nodes: [
    { id: "A", name: "节点 A" },
    { id: "B", name: "节点 B" },
    { id: "C", name: "节点 C" },
    { id: "D", name: "节点 D" },
  ],
  links: [
    { source: "A", target: "B" },
    { source: "A", target: "C" },
    { source: "B", target: "D" },
    { source: "C", target: "D" },
  ],
};

function App() {
  return (
    <div className="App">
      <header className="App-header">
        <h1>知识图谱示例</h1>
        <KnowledgeGraph data={data} />
      </header>
    </div>
  );
}

export default App;
